Node-RED block in Snap4City Microservice library node-red-contrib-snap4city-user is "iotdirectory-get-device">
It allows to retrieve the device information from the iotdirectory
Inputs
A JSON with these parameters:
- cbname
string
- The name of the context broker that hold the device you want to retrieve. It can be passed in
msg.payload.cbname
- devicename
string
- The name of the device you want to retrieve. It can be passed in
msg.payload.devicename
- service
string
- The name of the service the device is stored, in case of Orion w/MultiService (optional). It can be passed in
msg.payload.service
- servicepath
string
- The name of the Service Path the device is stored, in case of Orion w/MultiService (optional). It can be passed in
msg.payload.servicepath
Outputs
- Returns an array containing the information of the device
Details
The node can receive a JSON with the parameters described in the Inputs section and with them generate the output JSON.
If the values are not present in the input JSON, these are read by those in the configuration. If they are not present
in either part, an error is generated for the necessary parameters.